copy-to-java:
  cargo build
  cp target/debug/liblakesoul_io_c.dylib ../lakesoul-common/target/classes/
  cp target/debug/liblakesoul_metadata_c.dylib ../lakesoul-common/target/classes/

log_level := "info"

flight-sql level=log_level:
    RUST_LOG=lakesoul_flight={{level}},lakesoul_metadata={{level}} JWT_AUTH_ENABLED=false RBAC_AUTH_ENABLED=true cargo run --bin flight_sql_server
    
flight-sql-s3 level=log_level:
    RUST_LOG={{level}} cargo run --bin \
      flight_sql_server -- \
      --warehouse-prefix "s3://lakesoul-bucket/flight-test" \
      --endpoint  "http://localhost:9000" \
      --s3-bucket  "lakesoul-test-bucket" \
      --s3-access-key "minioadmin1" \
      --s3-secret-key "minioadmin1"

clean-tpch:
   rm -rf /tmp/lakesoul/tpch_data/*

clean-log:
    rm -rf /tmp/lakesoul/logs/*

console-s3 level=log_level:
    RUST_LOG={{level}}  cargo run --release --bin lakesoul-console -- --worker-threads 16  \
    --warehouse-prefix "s3://lakesoul-bucket/tpch" \
      --endpoint  "http://localhost:9000" \
      --s3-bucket  "lakesoul-test-bucket" \
      --s3-access-key "minioadmin1" \
      --s3-secret-key "minioadmin1"

console level=log_level:
    RUST_LOG={{level}} cargo run --release --bin lakesoul-console -- --worker-threads 16  

tpch-gen-s3:
    cargo run --release --bin lakesoul-console -- --worker-threads 16  \
    --warehouse-prefix "s3://lakesoul-bucket" \
      --endpoint  "http://localhost:9000" \
      --s3-bucket  "lakesoul-test-bucket" \
      --s3-access-key "minioadmin1" \
      --s3-secret-key "minioadmin1" tpch-gen -p "s3://lakesoul-bucket" --scale-factor 0.1 -n 8

tpch-gen-lfs level=log_level:
   RUST_LOG={{level}} cargo run --release --bin lakesoul-console -- --worker-threads 16  \
      tpch-gen -p "file:///tmp/lakesoul/tpch_data" --scale-factor 10.0 -n 8

clean-meta:
    cargo test -p lakesoul-datafusion test_schema_to_sql

tpch-gen-s3-1 level=log_level:
   RUST_LOG=trace cargo run --release --bin lakesoul-console -- --worker-threads 16  \
    --warehouse-prefix "s3://lakesoul-bucket" \
      --endpoint  "http://localhost:31099" \
      --s3-bucket  "lakesoul-bucket" \
      --s3-access-key "minioadmin" \
      --s3-secret-key "minioadmin" tpch-gen -p "s3://lakesoul-bucket" --scale-factor 0.1 -n 8
copy level=log_level:
   RUST_LOG={{level}} cargo run --release --bin lakesoul-console -- --worker-threads 16 --file copy.sql
